{namespace n=GeorgRinger\News\ViewHelpers}

<f:if condition="{newsItem.alternativeTitle}">
	<f:then><n:metaTag property="og:title" content="{newsItem.alternativeTitle}" /></f:then>
	<f:else><n:metaTag property="og:title" content="{newsItem.title}" /></f:else>
</f:if>
<n:metaTag property="og:type" content="{settings.opengraph.type}" />
<n:metaTag property="og:url" content="" useCurrentDomain="1" />
<n:metaTag property="og:site_name" content="{settings.opengraph.site_name}" />
<f:if condition="{newsItem.firstFalImagePreview}">
	<f:then>
		<n:metaTag
			property="og:image"
			content="{f:uri.image(src:'{newsItem.firstFalImagePreview.uid}', treatIdAsReference:1, maxWidth:'500')}"
			forceAbsoluteUrl="1" />
	</f:then>
	<f:else>
		<f:if condition="{newsItem.firstImagePreview.image}">
			<n:metaTag
					property="og:image"
					content="{f:uri.image(src:'uploads/tx_news/{newsItem.firstImagePreview.image}', maxWidth:'500')}"
					forceAbsoluteUrl="1" />
		</f:if>
	</f:else>
</f:if>

<f:if condition="{newsItem.description}">
	<f:then>
		<n:metaTag name="description" content="{newsItem.description}" />
		<n:metaTag property="og:description" content="{newsItem.description}" />
	</f:then>
	<f:else>
		<n:metaTag name="description" content="{newsItem.teaser}" />
		<n:metaTag property="og:description" content="{newsItem.teaser}" />
	</f:else>
</f:if>
<n:metaTag name="keywords" content="{newsItem.keywords}" />
<n:metaTag property="fb:admins" content="{settings.opengraph.admins}" />
<n:metaTag property="fb:admins" content="{settings.opengraph.admins}" />
<n:metaTag property="og:email" content="{settings.opengraph.email}" />
<n:metaTag property="og:phone_number" content="{settings.opengraph.phone_number}" />
<n:metaTag property="og:fax_number" content="{settings.opengraph.fax_number}" />
<n:metaTag property="og:latitude" content="{settings.opengraph.latitude}" />
<n:metaTag property="og:longitude" content="{settings.opengraph.longitude}" />
<n:metaTag property="og:street-address" content="{settings.opengraph.street-address}" />
<n:metaTag property="og:locality" content="{settings.opengraph.locality}" />
<n:metaTag property="og:region" content="{settings.opengraph.region}" />
<n:metaTag property="og:postal-code" content="{settings.opengraph.postal-code}" />
<n:metaTag property="og:country-name" content="{settings.opengraph.country-name}" />